import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('@/indexPages/index/index.vue')
  }, {
    path: '/Logon',
    name: 'Logon',
    component: () => import('@/pages/logon/logon.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

router.beforeEach((to, from, next) => {
  // debugger
  // 在这里处理路由跳转时的参数传递
  console.log('跳转前的参数：', to.params)
  next()
})

export default router